package com.ruoyi.quartz.task;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruoyi.common.utils.spring.SpringUtils;
import com.ruoyi.system.domain.fx.FxStoreGood;
import com.ruoyi.system.service.fx.IFxStoreGoodService;
import org.springframework.stereotype.Component;

import java.time.LocalDate;

/**
 * 月销售清空
 * 
 * @author ruoyi
 */
@Component("monthSellTask")
public class MonthSellTask
{
    private IFxStoreGoodService fxStoreGoodService = SpringUtils.getBean(IFxStoreGoodService.class);

    //删除月销售
    public void monthSell() {
        FxStoreGood storeGood = new FxStoreGood();
        // 获取当前日期
        LocalDate today = LocalDate.now();
        // 检查是否是1号
        boolean isFirstDayOfMonth = today.getDayOfMonth() == 1;
        if (isFirstDayOfMonth) {
            LambdaQueryWrapper<FxStoreGood> lqw = new LambdaQueryWrapper<>();
            // TODO 未完成
        }
    }
}
